1. Field of the Invention
This invention relates to a communication field, and more particularly to a method and apparatus for data transmission.
2. Description of the Prior Art
In the Internet of prior art, the networking and data transmission are mainly implemented by TCP (Transmission Control Protocol)/IP (Internet Protocol). TCP is a connection-oriented, end-to-end protocol. The application layer transmits to the TCP layer a data stream which is used for inter-network transmission and represented by 8-bit bytes, then TCP segments the data stream into data packets with appropriate length and passes the data packets to the IP layer, and then the IP layer transmits the data packets to the TCP layer of a receiving side. In order to avoid the occurrence of packet losses, TCP assigns a sequence number to each byte to ensure that the data packets are received in order at the receiving side. The receiving side sends back a corresponding acknowledgement (ACK) for a group of TCP packets which has been successfully received and verified to be correct. If the transmitting side has received the ACK within a certain time, it will continue to transmit data; and if the transmitting side has not received the ACK within the certain time, or if the transmitting side has received three acknowledgements for a data packet prior to a certain data packet, the corresponding data will be retransmitted as a result.
In the actual TCP/IP transmission, if a round-trip time delay occurs, i.e. if the period from the transmitting side transmitting an IP data packet with a TCP payload (hereinafter referred to as TCP payload) to the receiving side receiving the IP data packet of the TCP ACK (hereinafter referred to as TCP ACK), i.e. RTT is too long, the continuity of data transmitting by the transmitting side will be affected, thereby the rate will be affected. Especially in an asymmetric network, such as ADSL and mobile communication network, a congestion usually occurs due to the accumulation of a large amount of data caused by a narrow bandwidth in the direction of the narrow bandwidth, which results in that the TCP ACK cannot be timely transmitted back to the transmitting side, and the transmission rate will be reduced because of a congestion mechanism activated by the transmitting side, so that the data transmission efficiency will be significantly reduced.
As to the problem on how to improve the data transmission performance of the TCP/IP at a user side in the asymmetric network, the existing strategies mainly include:
Strategy 1: adjusting TCP window sizes of the transmitting and receiving sides, increasing the initial transmission window size of the transmitting side, limiting the rate of the transmitting side, adjusting the size of maximum data transmission unit, activating the path Maximum Transmission Unit (MTU) detection mechanism at the transmitting side, activating the direct congestion mechanism, and activating the timestamp mechanism, and etc. This strategy is a corresponding adjustment for the parameters and mechanisms of the existing TCP/IP and improves the data transmission performance of TCP/IP to some extent, but the strategy has some significant limitations: Firstly, the parameter adjustment often adopts different combinations of parameters for different application scenarios to achieve a certain effect, while cannot achieve a once-and-for-all unified effect; Secondly, in the actual Internet, the respective service node hosts are uncontrollable, thus it is difficult to modify the TCP/IP parameters.
Strategy 2: in the bi-directional data transmission, two transmission queues with different priorities are established: the queue with high priority buffers the TCP ACKs, while the queue with low priority buffers non-TCP ACKs data. The data of the TCP ACK queue with high priority is transmitted first. This policy can reduce the round-trip time delay of data transmission, and ensure the efficiency of data transmission in the case of bi-directional data transmission. However, there are also some limitations: Firstly, if the data transmission is only a one-way transmission, only the TCP ACK data packets are transmitted to the transmitting side by the receiving side, i.e. only the TCP ACK queue will buffer the data, thus the case of firstly transmitting the data of the queue with high priority does not exist, so that the roundtrip time delay of the data transmission of the transmitting side can not be improved and the data transmission efficiency can neither be improved; Secondly, if the data transmission is the bidirectional transmission, and the data of the TCP ACK queue is firstly transmitted in a certain direction, the data transmission of the non-TCP ACK queue will be affected to some extent because the bandwidth in this direction is fixed, thus affecting the efficiency of data transmission in this direction.